package com.bw.controller;

import com.bw.bean.Vo;
import com.bw.service.OrderService;
import com.sugar.SugarUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
public class OrderController {
    @Autowired
    OrderService orderService;

    @RequestMapping("cx1")
    public Map t1()
    {
        List<Vo> list=orderService.cx1();
        return SugarUtil.getMapData(list);
    }

    @RequestMapping("cx2")
    public Map t2()
    {
        List<Vo> list=orderService.cx2();
        return SugarUtil.getPieData(list);
    }

    @RequestMapping("cx3")
    public Map t3()
    {
        Double list=orderService.cx3();
        return SugarUtil.getFlipNumberData(list);
    }
}
